import request from '@/utils/request'
import formurlencoded from 'form-urlencoded'

//直播类型列表
export function listLiveType(query) {
  return request({
    url: '/admin/live/type/list',
    method: 'get',
    params: query
  })
}
//直播类型新加
export function createLiveType(data) {
  return request({
    url: '/admin/live/type/create',
    method: 'post',
    data: formurlencoded(data)
  })
}
//直播类型修改取数据
export function editLiveType(query) {
  return request({
    url: '/admin/live/type/edit',
    method: 'get',
    params: query
  })
}
//直播类型更新
export function updateLiveType(data) {
  return request({
    url: '/admin/live/type/update',
    method: 'post',
    data: formurlencoded(data)
  })
}
//直播类型删除
export function delLiveType(data) {
  return request({
    url: '/admin/live/type/del',
    method: 'post',
    data: formurlencoded(data)
  })
}
//直播类型启用
export function auditYesLiveType(data) {
  return request({
    url: '/admin/live/type/auditYes',
    method: 'post',
    data: formurlencoded(data)
  })
}
//直播类型停用
export function auditNoLiveType(data) {
  return request({
    url: '/admin/live/type/auditNo',
    method: 'post',
    data: formurlencoded(data)
  })
}

//主播列表
export function listLiveAnchor(query) {
  return request({
    url: '/admin/live/anchor/list',
    method: 'get',
    params: query
  })
}
//取主播数据
export function editLiveAnchor(query) {
  return request({
    url: '/admin/live/anchor/edit',
    method: 'get',
    params: query
  })
}
//审核通过主播
export function auditupLiveAnchor(data) {
  return request({
    url: '/admin/live/anchor/auditup',
    method: 'post',
    data: formurlencoded(data)
  })
}
//审核驳回主播
export function auditdownLiveAnchor(data) {
  return request({
    url: '/admin/live/anchor/auditdown',
    method: 'post',
    data: formurlencoded(data)
  })
}
//下架主播
export function downLiveAnchor(data) {
  return request({
    url: '/admin/live/anchor/down',
    method: 'post',
    data: formurlencoded(data)
  })
}
//关注主播列表
export function listCollectLiveAnchor(query) {
  return request({
    url: '/admin/live/anchor/listCollect',
    method: 'get',
    params: query
  })
}
//主播排序
export function sortLiveAnchor(data) {
  return request({
    url: '/admin/live/anchor/sort',
    method: 'post',
    data: formurlencoded(data)
  })
}


//直播列表
export function listLiveVideo(query) {
  return request({
    url: '/admin/live/video/list',
    method: 'get',
    params: query
  })
}
//取直播数据
export function editLiveVideo(query) {
  return request({
    url: '/admin/live/video/edit',
    method: 'get',
    params: query
  })
}
export function addLiveVideo(query) {
  return request({
    url: '/admin/live/video/add',
    method: 'get',
    params: query
  })
}
//审核通过直播
export function auditupLiveVideo(data) {
  return request({
    url: '/admin/live/video/auditup',
    method: 'post',
    data: formurlencoded(data)
  })
}
//审核驳回直播
export function auditdownLiveVideo(data) {
  return request({
    url: '/admin/live/video/auditdown',
    method: 'post',
    data: formurlencoded(data)
  })
}
//下架直播
export function downLiveVideo(data) {
  return request({
    url: '/admin/live/video/down',
    method: 'post',
    data: formurlencoded(data)
  })
}
//直播排序
export function sortLiveVideo(data) {
  return request({
    url: '/admin/live/video/sort',
    method: 'post',
    data: formurlencoded(data)
  })
}
//取直播的商品
export function listProductLiveVideo(query) {
  return request({
    url: '/admin/live/video/listProduct',
    method: 'get',
    params: query
  })
}
//取直播评论
export function listCommentLiveVideo(query) {
  return request({
    url: '/admin/live/video/listComment',
    method: 'get',
    params: query
  })
}
//根据直播ID取得查看直播间以及直播间点赞
export function listLogLiveVideo(query) {
  return request({
    url: '/admin/live/video/listLog',
    method: 'get',
    params: query
  })
}


//直播评论
export function listLiveVideoComment(query) {
  return request({
    url: '/admin/live/comment/list',
    method: 'get',
    params: query
  })
}
